home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-07-31 | 53.9 KB | 2,056 lines |
- This is an official patch to nn release 6.4
- -------------------------------------------
-
- PATCH #9
-
- Priority: MEDIUM
-
-
- These patches fix a trivial, but irritating bug introduced in patch
- #8, as well as a few other bugs which have been on the "to-be-fixed"
- list for some time. Here are some of the fixes:
-
- - Setting "record" in the init file would cause nn to dump core.
-
- - By mistake I had used one of those "wonderful" tri-graphs defined by
- ANSI-C in a string constant ("??/" was taken as "\" which obviously
- isn't a complete string - sigh!)
-
- - Using K in reading mode to auto-select on a subject no longer skips
- to the next group immediately. Also it no longer leaves the current
- article selected on the next invocation unless marked so explicitly.
-
- - If some articles are read and other are left unread in a group,
- going back to the group with "P" would only show the remaining
- unread articles on the menu - now the read articles which were
- initially unread are included on the menu (marked read).
- [there is a new previous-also-read variable to control this].
-
- - There was a crude bug in the parsing of folders which could fool nn
- if the last article in a folder was a patch (diff -c).
-
- - There has been some problems with "nnmaster -k" not killing the
- running master. It now tries a little harder, but it still has to
- be seen whether that is hard enough :-)
-
-
- New features:
-
- - There are now so many variables that ":set all" has become a tedious
- way to check a specific variable's value. There is now a new form:
- :set /regexp
- which will list only the variables matching the given regular expression.
-
- - When completing a variable name in the :set command, the current
- value of the variable is shown in the message line.
-
- - The built-in pager can now scroll article text if the variable
- scroll-last-lines is set to -1. It may also be set to a positive
- number in which case, nn will only scroll if there are less than
- that many lines left in the article. Try setting it to 10 to see
- its intended use (to scroll only the last page).
-
- - There is a new "admins" file which can be created in the CLIENT
- directory. It should contain the login names of the users which are
- allowed to use the more advanced features of nnacct, e.g. -ar.
-
- - Variables can now be set on the command line using arguments of the
- form variable=value.
-
-
- As usual, all changes are described in the updated RELEASE_NOTES file
- (read that for more details about this patch). Thanks to all who
- reported bugs and provided fixes.
-
- To apply this patch, use nn's :patch command, or run this command from
- the shell in the root of the nn source tree:
- patch -p0 < this-article
-
- Then run "make all" and "./inst u".
-
- ++Kim Storm
-
- *** ./LAST/account.c Mon Jul 16 17:38:38 1990
- --- account.c Wed Jul 18 10:20:57 1990
- ***************
- *** 349,354 ****
- --- 349,378 ----
- fprintf(stderr, "ZERO of accounts failed -- check permissions etc.\n");
- }
-
- + static news_admin(caller)
- + char *caller;
- + {
- + FILE *adm;
- + char line[80];
- + int len, ok;
- +
- + adm = open_file(relative(lib_directory, "admins"), OPEN_READ);
- + if (adm == NULL) return 2;
- + len = strlen(caller);
- + ok = 0;
- +
- + while (fgets(line, 80, adm)) {
- + if (line[len] != NL) continue;
- + line[len] = NUL;
- + if (strcmp(caller, line) == 0) {
- + ok = 1;
- + break;
- + }
- + }
- + fclose(adm);
- + return ok;
- + }
- +
- main(argc, argv)
- int argc;
- char *argv[];
- ***************
- *** 371,376 ****
- --- 395,403 ----
- }
-
- if (user_id != 0) {
- + caller = user_name();
- + if (news_admin(caller) == 1) goto caller_ok;
- +
- if (report_all) {
- fprintf(stderr, "Only root can request complete reports\n");
- exit(9);
- ***************
- *** 391,403 ****
- fprintf(stderr, "Only root can request reports for other users\n");
- exit(9);
- }
- -
- - if ((caller = getlogin()) == NULL)
- - if ((caller = user_name()) == NULL)
- - caller = "UNKNOWN";
- } else
- caller = "root";
-
- if ((new_policy >= 0 || new_quota >= 0) && users == 0) {
- fprintf(stderr, "usage: %s -pPOLICY -qQUOTA user...\n", argv[0]);
- exit(1);
- --- 418,427 ----
- fprintf(stderr, "Only root can request reports for other users\n");
- exit(9);
- }
- } else
- caller = "root";
-
- + caller_ok:
- if ((new_policy >= 0 || new_quota >= 0) && users == 0) {
- fprintf(stderr, "usage: %s -pPOLICY -qQUOTA user...\n", argv[0]);
- exit(1);
- *** ./LAST/answer.c Mon Jul 16 17:38:39 1990
- --- answer.c Tue Jul 17 20:26:23 1990
- ***************
- *** 249,255 ****
- clrdisp();
- pg_init(0, 1);
- }
- ! pg_regexp = regcomp(expr);
-
- while (fgets(line, 512, f)) {
- if (pg_regexp && regexec_fold(pg_regexp, line) == 0) continue;
- --- 249,255 ----
- clrdisp();
- pg_init(0, 1);
- }
- ! if (expr) pg_regexp = regcomp(expr);
-
- while (fgets(line, 512, f)) {
- if (pg_regexp && regexec_fold(pg_regexp, line) == 0) continue;
- ***************
- *** 846,852 ****
-
- prompt(who_am_i == I_AM_POST ? "Newsgroups: " : "\1POST to group\1 ");
-
- ! strcpy(brk_chars, "??/");
- brk_chars[0] = help_key;
- str = get_s(current_group ? current_group->group_name : NONE,
- group_name, brk_chars, group_completion);
- --- 846,852 ----
-
- prompt(who_am_i == I_AM_POST ? "Newsgroups: " : "\1POST to group\1 ");
-
- ! strcpy(brk_chars, " /?");
- brk_chars[0] = help_key;
- str = get_s(current_group ? current_group->group_name : NONE,
- group_name, brk_chars, group_completion);
- *** ./LAST/articles.c Tue Jun 12 11:46:26 1990
- --- articles.c Tue Jul 17 16:03:55 1990
- ***************
- *** 285,291 ****
- leave_attr = A_LEAVE_NEXT;
-
- if (!(flags & ACC_SPEW_MODE))
- ! use_newsrc(gh, (flags & ACC_ORIG_NEWSRC) ? 1 : 0);
-
- if ((flags & ACC_EXTRA_ARTICLES) == 0)
- mark_memory(&mem_marker);
- --- 285,292 ----
- leave_attr = A_LEAVE_NEXT;
-
- if (!(flags & ACC_SPEW_MODE))
- ! use_newsrc(gh, (flags & ACC_MERGED_NEWSRC) ? 2 :
- ! (flags & ACC_ORIG_NEWSRC) ? 1 : 0);
-
- if ((flags & ACC_EXTRA_ARTICLES) == 0)
- mark_memory(&mem_marker);
- ***************
- *** 371,376 ****
- --- 372,380 ----
-
- ah->attr = test_article(ah);
-
- + if (flags & ACC_MERGED_NEWSRC) {
- + if (ah->attr == A_KILL) continue;
- + } else
- if (ah->attr != A_READ && (flags & ACC_ONLY_READ_ARTICLES))
- continue;
-
- ***************
- *** 412,417 ****
- --- 416,423 ----
- break;
-
- case A_READ:
- + if (flags & ACC_MERGED_NEWSRC) break;
- +
- if (!(flags & (ACC_ALSO_READ_ARTICLES | ACC_ONLY_READ_ARTICLES)))
- if (ah->a_number > gh->last_article)
- continue;
- *** ./LAST/articles.h Tue Jun 12 11:46:26 1990
- --- articles.h Tue Jul 17 15:09:37 1990
- ***************
- *** 53,55 ****
- --- 53,56 ----
- #define ACC_ON_SUBJECT FLAG(13) /* match on subject (also) */
- #define ACC_DO_KILL FLAG(14) /* do auto-kill/select */
- #define ACC_PARSE_VARIABLES FLAG(15) /* kill, split, etc. */
- + #define ACC_MERGED_NEWSRC FLAG(16) /* merge orig and cur .newsrc */
- *** ./LAST/digest.c Thu Apr 26 16:35:07 1990
- --- digest.c Wed Jul 18 13:17:01 1990
- ***************
- *** 165,170 ****
- --- 165,172 ----
- if (line_type[backup_index] & (LN_ASTERISK | LN_END_OF)) break;
- }
-
- + digest.dg_lpos = backup_p[backup_index];
- +
- if (digest.dg_lines == 0) return 0;
-
- while (--backup_count >= 0) {
- *** ./LAST/doc/RELEASE_NOTES Mon Jul 16 17:38:41 1990
- --- doc/RELEASE_NOTES Wed Jul 18 18:57:12 1990
- ***************
- *** 967,973 ****
- --- 967,1055 ----
- From: Tony Wilson <wilson@issun3.stc.nl>
- Fixed: Patch #8 [menu.c -- buffer overrun in get_purpose]
-
- + Prog: nn
- + Title: Cannot set "record" variable (dumps core). (bug in patch 8)
- + From: beldar@mips.com (Gardner Cohen) + fix
- + Damian Chu <dac@doc.ic.ac.uk> + fix
- + Tony Wilson <wilson%shapetc@nluug.nl>
- + rock@warp.Eng.Sun.COM (Bill Petro)
- + Fixed: Patch #9 [variable.c]
- +
- + Prog: nn
- + Title: Crash if all entries in kill file are obsolete.
- + From: olson%anchor.esd@sgi.com (Dave Olson)
- + Fixed: Patch #9 [kill.c]
- +
- + Prog: nn
- + Title: Patch #8 uses a tri-graph in a string constant.
- + From: Bo Kullmar <bk@kullmar.se>
- + Fixed: Patch #9 [answer.c]
- +
- + Prog: nn
- + Title: "P" to a group with unread articles should include read articles.
- + From: Pekka Kyt|laakso <netmgr@csc.fi>
- + isaac@goanna.cs.rmit.oz.au (Isaac Balbin)
- + Fixed: Patch #9 [articles.c articles.h group.c newsrc.c nn.c variable.c nn.1]
- +
- + There is a new variable "previous-also-read" which can be
- + unset to get the old "buggy" behaviour.
- +
- + Prog: nn
- + Title: Only some commands could be bound to user-defined keymaps.
- + From: KFS
- + Fixed: Patch #9 [keymap.c]
- +
- + Prog: nn
- + Title: If a command cannot be bound in a specific map, the error
- + message incorrectly says that the command does not exist.
- + From: rock@warp.Eng.Sun.COM (Bill Petro)
- + Fixed: Patch #9 [init.c keymap.c macro.c]
- +
- + Prog: nnpost, nn
- + Title: Entering "?" to Newsgroups: prompt will give an (ignored) REGEXP ERROR
- + From: dean@coplex.uucp (Dean Brooks)
- + Fixed: Patch #9 [answer.c]
- +
- + Prog: nn
- + Title: Some "export" declarations were missing the type name ("int").
- + From: eps@toaster.SFSU.EDU (Eric P. Scott) + fix
- + Fixed: Patch #9 [expire.c news.c nntp.c]
- +
- + Prog: nnmaster
- + Title: "nnmaster -k" sometimes fails to kill running master.
- + From: ...
- + Fixed: Patch #9 [master.c]
- +
- + It seems like the HUP signal is lost somewhere; the fix involves
- + also sending a TERM signal and introducing some delays.
- +
- + Prog: nnmaster
- + Title: If nnmaster is started in the nn source directory (by root), all
- + sorts of problems with files changing owner to root etc. could happen.
- + From: Paul Graham <pjg@acsu.buffalo.edu>
- + Fixed: Patch #9 [master.c]
- +
- + Prog: nn, nnacct
- + Title: The login name of the user is not always found correctly (it's blank).
- + From: asd@mace.cc.purdue.edu (Kareth)
- + Fixed: Patch #9 [global.c]
- +
- + It seems that if nn is invoked from xterm, getlogin may return an
- + empty string instead of the user name. nn now checks for this
- + return value and uses other ways to get the user name (passwd, $USER).
- +
- + Prog: nn
- + Title: If last article in a folder is a patch, that article's body by be lost.
- + From: asd@mace.cc.purdue.edu (Kareth)
- + Fixed: Patch #9 [digest.c]
- +
- + Prog: nn
- + Title: K command in reading mode would skip to next article also when making
- + an auto-select entry. Furthermore it would keep the article selected.
- + From: chuq@Apple.COM (The Bounty Hunter)
- + Fixed: Patch #9 [menu.c more.c]
-
- +
- New features since initial 6.4.0 release
- ----------------------------------------
-
- ***************
- *** 1252,1254 ****
- --- 1334,1367 ----
- Title: The proper "re prefix" is now also shown on the "*" header in read mode
- From: Uwe Doering (adapted by KFS)
- Added: Patch #8 [menu.c more.c variable.c]
- +
- + Prog: nn
- + Title: Added ":set /regexp" to list only selected variables.
- + From: KFS
- + Added: Patch #9 [init.c variable.c nn.1]
- +
- + Prog: nn
- + Title: Completion of a variable name (e.g. :set au<space>) will now
- + show the current value of the variable in the message line.
- + From: KFS
- + Added: Patch #9 [init.c variable.c term.c nn.1]
- +
- + Prog: nn
- + Title: New "scroll-last-lines" variable to make nn scroll last page only.
- + From: KFS on request from news@m2xenix.psg.com (Randy Bush)
- + Added: Patch #9 [more.c variable.c nn.1]
- +
- + If < 0, nn will scroll text rather than display each new page from
- + the top of the screen. If > 0, then nn will scroll the last
- + "s-l-l" lines of the article (and display the rest as usual).
- +
- + Prog: nnacct
- + Title: New "$CLIENT/admins" file where the login names of the privileged
- + news administrators allowed to run nnacct besides root can be listed.
- + From: KFS on request from asd@mace.cc.purdue.edu (Kareth)
- + Added: Patch #9 [account.c nnacct.1m]
- +
- + Prog: nn
- + Title: Variables can now be set on nn command line with var=value.
- + From: KFS on request from asd@mace.cc.purdue.edu (Kareth)
- + Added: Patch #9 [sequence.c]
- *** ./LAST/expire.c Mon Jun 25 15:46:39 1990
- --- expire.c Tue Jul 17 20:26:16 1990
- ***************
- *** 21,29 ****
- * 3: recollect group to expire (also if "min" still exists)
- */
-
- ! export expire_method = 1; /* expire method */
- ! export recollect_method = 1; /* recollection method -- see do_expire */
- ! export expire_level = 0; /* automatic expiration detection */
-
- #ifdef HAVE_DIRECTORY
-
- --- 21,29 ----
- * 3: recollect group to expire (also if "min" still exists)
- */
-
- ! export int expire_method = 1; /* expire method */
- ! export int recollect_method = 1; /* recollection method -- see do_expire */
- ! export int expire_level = 0; /* automatic expiration detection */
-
- #ifdef HAVE_DIRECTORY
-
- *** ./LAST/global.c Mon Jul 16 17:38:42 1990
- --- global.c Wed Jul 18 16:29:23 1990
- ***************
- *** 93,101 ****
-
- sig_type catch_hangup(n)
- {
- signal(n, SIG_IGN);
-
- - s_hangup++;
- #ifdef FAKE_INTERRUPT
- if (fake_keyb_siglist[n] && arm_fake_keyb_sig)
- longjmp(fake_keyb_sig, 1);
- --- 93,101 ----
-
- sig_type catch_hangup(n)
- {
- + s_hangup = 1;
- signal(n, SIG_IGN);
-
- #ifdef FAKE_INTERRUPT
- if (fake_keyb_siglist[n] && arm_fake_keyb_sig)
- longjmp(fake_keyb_sig, 1);
- ***************
- *** 188,193 ****
- --- 188,199 ----
-
- process_id = getpid();
-
- + #ifdef CLIENT_DIRECTORY
- + lib_directory = CLIENT_DIRECTORY;
- + #else
- + lib_directory = LIB_DIRECTORY;
- + #endif
- +
- #ifdef NEWS_DIRECTORY
- news_directory = NEWS_DIRECTORY;
- #else
- ***************
- *** 228,239 ****
- /* this may later be changed by nntp_check */
- news_active = mk_file_name(news_lib_directory, "active");
-
- - #ifdef CLIENT_DIRECTORY
- - lib_directory = CLIENT_DIRECTORY;
- - #else
- - lib_directory = LIB_DIRECTORY;
- - #endif
- -
- #ifdef MASTER_DIRECTORY
- master_directory = MASTER_DIRECTORY;
- #else
- --- 234,239 ----
- ***************
- *** 606,623 ****
- {
- static char *user = NULL;
- struct passwd *pw, *getpwuid();
-
- if (who_am_i == I_AM_MASTER) return "M";
- if (who_am_i == I_AM_EXPIRE) return "X";
-
- if (user == NULL) {
- ! extern char *getlogin();
- ! if (user = getlogin()) return user;
- pw = getpwuid((int)user_id);
- ! if (pw == NULL) user = "?";
- ! user = copy_str(pw->pw_name);
- }
-
- return user;
- }
-
- --- 606,634 ----
- {
- static char *user = NULL;
- struct passwd *pw, *getpwuid();
- + extern char *getlogin(), *getenv();
-
- if (who_am_i == I_AM_MASTER) return "M";
- if (who_am_i == I_AM_EXPIRE) return "X";
-
- if (user == NULL) {
- ! user = getlogin();
- ! if (user != NULL && *user != NUL) goto out;
- !
- pw = getpwuid((int)user_id);
- ! if (pw != NULL && pw->pw_name[0] != NUL) {
- ! user = copy_str(pw->pw_name);
- ! goto out;
- ! }
- !
- ! user = getenv("LOGNAME");
- ! if (user != NULL && *user != NUL) goto out;
- ! user = getenv("USER");
- ! if (user != NULL && *user != NUL) goto out;
- ! user = "?";
- }
-
- + out:
- return user;
- }
-
- *** ./LAST/group.c Mon Jul 16 17:38:44 1990
- --- group.c Tue Jul 17 17:21:41 1990
- ***************
- *** 248,254 ****
-
- update_unsafe:
- if ((gh->current_first = first_art) < 0) {
- ! if (access_mode & ACC_ORIG_NEWSRC)
- gh->current_first = gh->first_article + 1;
- else if (access_mode & ACC_ALSO_READ_ARTICLES)
- gh->current_first = gh->first_db_article;
- --- 248,254 ----
-
- update_unsafe:
- if ((gh->current_first = first_art) < 0) {
- ! if (access_mode & (ACC_ORIG_NEWSRC | ACC_MERGED_NEWSRC))
- gh->current_first = gh->first_article + 1;
- else if (access_mode & ACC_ALSO_READ_ARTICLES)
- gh->current_first = gh->first_db_article;
- *** ./LAST/init.c Mon Jul 16 17:38:44 1990
- --- init.c Tue Jul 17 20:07:46 1990
- ***************
- *** 357,362 ****
- --- 357,363 ----
- for (p = head; *p; )
- if (*p++ == SP) return -1;
- other_compl = var_completion;
- + var_compl_opts(tail - buf);
- tail = NULL;
- temp = var_completion(head, len);
- break;
- ***************
- *** 687,692 ****
- --- 688,697 ----
- code = lookup_command(argv(3), map_def->km_flag & (K_ONLY_MENU|K_ONLY_MORE));
-
- switch (code) {
- + case K_INVALID-1:
- + init_message("Cannot bind '%s' in '%s' map", argv(3), argv(1));
- + goto out;
- +
- case K_EQUAL_KEY:
- if (argv(4) == NULL) goto mac_err;
- code = map[parse_key(argv(4))];
- ***************
- *** 882,895 ****
- }
-
- CASE( "set" ) {
- ! if (ARGTAIL == NULL) {
- ! disp_variables(0);
- return AC_REDRAW;
- }
-
- cmd = argv(1); /* get ARGTAIL right */
- if (cmd != NULL && strcmp(cmd, "all") == 0) {
- ! disp_variables(1);
- return AC_REDRAW;
- }
-
- --- 887,900 ----
- }
-
- CASE( "set" ) {
- ! if (ARGTAIL == NULL || ARGTAIL[0] == '/') {
- ! disp_variables(0, ARGTAIL);
- return AC_REDRAW;
- }
-
- cmd = argv(1); /* get ARGTAIL right */
- if (cmd != NULL && strcmp(cmd, "all") == 0) {
- ! disp_variables(1, (char *)NULL);
- return AC_REDRAW;
- }
-
- ***************
- *** 998,1004 ****
-
- alt_cmd_key = lookup_command(sw_string,
- in_menu_mode ? K_ONLY_MENU : K_ONLY_MORE);
- ! if (alt_cmd_key != K_INVALID && alt_cmd_key != K_HELP) {
- if (alt_cmd_key == K_MACRO) {
- if (ARGTAIL == NULL) break;
- alt_cmd_key |= atoi(ARGTAIL);
- --- 1003,1009 ----
-
- alt_cmd_key = lookup_command(sw_string,
- in_menu_mode ? K_ONLY_MENU : K_ONLY_MORE);
- ! if (alt_cmd_key > K_INVALID && alt_cmd_key != K_HELP) {
- if (alt_cmd_key == K_MACRO) {
- if (ARGTAIL == NULL) break;
- alt_cmd_key |= atoi(ARGTAIL);
- *** ./LAST/keymap.c Mon Jul 16 17:38:45 1990
- --- keymap.c Tue Jul 17 20:07:47 1990
- ***************
- *** 583,589 ****
- if (cnmp->cmd_restriction == restriction) break;
- case 0:
- if (cnmp->cmd_restriction == 0) break;
- ! return K_INVALID;
- default:
- break;
- }
- --- 583,589 ----
- if (cnmp->cmd_restriction == restriction) break;
- case 0:
- if (cnmp->cmd_restriction == 0) break;
- ! return K_INVALID-1;
- default:
- break;
- }
- ***************
- *** 904,910 ****
- m = &keymaps[ix];
- m->km_name = copy_str(name);
- m->km_map = newobj(int, KEY_MAP_SIZE);
- ! m->km_flag = 0;
- for (kp = m->km_map; kp < &(m->km_map)[KEY_MAP_SIZE]; ) *kp++ = K_UNBOUND;
-
- return ix;
- --- 904,910 ----
- m = &keymaps[ix];
- m->km_name = copy_str(name);
- m->km_map = newobj(int, KEY_MAP_SIZE);
- ! m->km_flag = K_ONLY_MORE | K_ONLY_MENU;
- for (kp = m->km_map; kp < &(m->km_map)[KEY_MAP_SIZE]; ) *kp++ = K_UNBOUND;
-
- return ix;
- *** ./LAST/kill.c Tue Jun 12 11:46:39 1990
- --- kill.c Tue Jul 17 11:31:17 1990
- ***************
- *** 793,806 ****
- /* DB check: if database is rebuilt, group numbers may change */
- if (header.ckh_db_check != master.db_created) goto err;
-
- ! kill_patterns = newstr(header.ckh_pattern_size);
- kill_tab = newobj(kill_list_entry, header.ckh_entries);
- if (regexp_table_size = header.ckh_regexp_size)
- group_regexp_table = newobj(kill_group_regexp, header.ckh_regexp_size);
- -
- - fseek(killf, (off_t)(header.ckh_entries * sizeof(entry)), 1);
- - if (fread(kill_patterns, sizeof(char), (int)header.ckh_pattern_size, killf)
- - != header.ckh_pattern_size) goto err;
-
- tb = group_regexp_table;
-
- --- 793,815 ----
- /* DB check: if database is rebuilt, group numbers may change */
- if (header.ckh_db_check != master.db_created) goto err;
-
- ! if (header.ckh_entries == 0) {
- ! fclose(killf);
- ! kill_file_loaded = 1;
- ! return 0;
- ! }
- !
- ! if (header.ckh_pattern_size > 0) {
- ! kill_patterns = newstr(header.ckh_pattern_size);
- ! fseek(killf, (off_t)(header.ckh_entries * sizeof(entry)), 1);
- ! if (fread(kill_patterns, sizeof(char), (int)header.ckh_pattern_size, killf)
- ! != header.ckh_pattern_size) goto err;
- ! } else
- ! kill_patterns = newstr(1);
- !
- kill_tab = newobj(kill_list_entry, header.ckh_entries);
- if (regexp_table_size = header.ckh_regexp_size)
- group_regexp_table = newobj(kill_group_regexp, header.ckh_regexp_size);
-
- tb = group_regexp_table;
-
- *** ./LAST/macro.c Mon Jul 9 17:59:56 1990
- --- macro.c Tue Jul 17 20:07:46 1990
- ***************
- *** 203,209 ****
- goto ok;
- }
-
- ! if ((cmd = lookup_command(w, (K_ONLY_MENU | K_ONLY_MORE))) != K_INVALID) {
- m_new(M_COMMAND);
- m->m_int = GETC_COMMAND | cmd;
- goto ok;
- --- 203,209 ----
- goto ok;
- }
-
- ! if ((cmd = lookup_command(w, (K_ONLY_MENU | K_ONLY_MORE))) > K_INVALID) {
- m_new(M_COMMAND);
- m->m_int = GETC_COMMAND | cmd;
- goto ok;
- *** ./LAST/man/nn.1.C Mon Jul 16 17:38:48 1990
- --- man/nn.1.C Thu Jul 19 17:52:37 1990
- ***************
- *** 42,47 ****
- --- 42,49 ----
- .br
- \- Through command line options when \fInn\fP is invoked.
- .br
- + \- Through \fIassignments\fP on the command line when \fInn\fP is invoked.
- + .br
- \- Through global \fBset\fP commands in the init file.
- .br
- \- Through \fBset\fP or \fBlocal\fP commands executed from entry macros.
- ***************
- *** 137,143 ****
- .LP
- The current variable settings can be shown with the
- .B :set
- ! command without arguments.
- .LP
- Variables are global by default, but a local instantiation of the
- variable can be created using the \fB:local\fP command. The local
- --- 139,162 ----
- .LP
- The current variable settings can be shown with the
- .B :set
- ! command:
- ! .TP
- ! \fB:set\fP (without arguments)
- ! This will give a listing of the variables which have been set in
- ! either the init file or interactively.
- ! .TP
- ! \fB:set all\fP
- ! This will give a listing of all variables. Modified variables will be
- ! marked with a `*' and \fIlocal\fP variables will be marked with a `>'.
- ! .TP
- ! \fB:set /\fP\fIregexp\fP
- ! This will give a listing of all variables whose name matches the given
- ! regular expression.
- ! .TP
- ! \fB:set\fP \fIpartial-name\fP \fBspace\fP
- ! The \fBspace\fP (\fBcomp1-key\fP) key will complete the variable name
- ! as usual, but as a side effect it will display the variable's current
- ! value in the message line.
- .LP
- Variables are global by default, but a local instantiation of the
- variable can be created using the \fB:local\fP command. The local
- ***************
- *** 799,804 ****
- --- 818,828 ----
- \fBpreview-mark-read\fP (boolean, default true)
- When set, previewing an article will mark the article as read.
- .TP
- + \fBprevious-also-read\fP (boolean, default true)
- + When set, going back to the previously read group with \fBP\fP
- + {\fBprevious\fP} will include articles read in the current invocation
- + of \fInn\fP even if there are still unread articles in the group.
- + .TP
- \fBprint-header-lines\fP \fIfields\fP (string, default "FDGS")
- Specifies the list of header fields that are output when
- an article is printed via the \fB:print\fP command and
- ***************
- *** 852,857 ****
- --- 876,890 ----
- 4: If any references use layout 0, else layout 1.
- .fi
- .TP
- + \fBre-layout-read\fP \fIN\fP (integer, default -1)
- + When the \fBheader-lines\fP variable is not set, or contains the "*"
- + field specifier, a line similar to the menu line will be used as the
- + header of the article in reading mode, including the sender's name and
- + the article's subject. When this variable is negative, the subject
- + on this header line will be prefixed according to the \fBre-layout\fP
- + variable. Otherwise, it will define the format of the "Re:" prefix to
- + be used instead of the \fBre-layout\fP used on the menu.
- + .TP
- \fBread-return-next-page\fP (boolean, default false)
- When set, the \fBZ\fP {\fBread-return\fP} command will return to the
- \fInext\fP menu page rather than the current menu page.
- ***************
- *** 871,876 ****
- --- 904,914 ----
- repeat the query for a group to enter until you quit explicitly.
- (Same as setting the \fB\-r\fP option permanently).
- .TP
- + \fBreport-cost\fP (boolean, default true)
- + This variable is ignored unless \fInn\fP is running with accounting
- + enabled (see \fInnacct\fP). When set, \fInn\fP will report the cost
- + of the current session and the total on exit.
- + .TP
- \fBresponse-check-pause\fP \fIpause\fP (integer, default 2)
- Specifies the number of seconds to wait after posting an article to
- see whether the action *might* have failed. Some commands run in the
- ***************
- *** 923,928 ****
- --- 961,975 ----
- \fBscroll-clear-page\fP (boolean, default true)
- Determines whether \fInn\fP clears the screen before showing each new
- page of an article.
- + .TP
- + \fBscroll-last-lines\fP \fIN\fP (integer, default 0)
- + Normally, \fInn\fP will show each new page of an article from the top
- + of the screen (with proper marking of the overlap). When this
- + variable is set to a negative value, \fInn\fP will scroll the text of
- + the new pages from the bottom of the screen instead. If it is set to a
- + positive value, \fInn\fP will show pages from the top as usual, but
- + switch to scrolling when there are \fIless than\fP the specified
- + number of lines left in the article.
- .TP
- \fBselect-leave-next\fP (boolean, default false)
- When set, you will be asked whether to select articles with the
- *** ./LAST/man/nn.1.D Mon Jul 16 17:38:48 1990
- --- man/nn.1.D Thu Jul 19 17:52:37 1990
- ***************
- *** 113,118 ****
- --- 113,127 ----
- .B toggle
- command.
- .LP
- + Besides the options described below, you can set \fIany\fP of
- + \fInn\fP's variables directly on the command line via an argument of
- + the following format:
- + .sp 0.5v
- + variable=value
- + .sp 0.5v
- + To set or unset a boolean variable, the value can be specified as
- + \fIon\fP or \fIoff\fP (\fIt\fP and \fIf\fP will also work).
- + .LP
- Notice that the init files are read \fIbefore\fP the options are
- parsed (unless you use the \-\fBI\fP option). Therefore, the options
- which are related to boolean variables set in the init file will
- *** ./LAST/man/nnacct.1m Mon Jul 16 17:38:49 1990
- --- man/nnacct.1m Wed Jul 18 17:06:19 1990
- ***************
- *** 5,11 ****
- .SH SYNOPSIS
- \fBnnacct\fP \-\fBr\fP [ \-\fBf\fP file ] [ \-\fBa\fP ] [ user ]...
- .br
- ! \fBnnacct\fP \-\fBp\fP\fIpolicy\fP \-\fBq\fP\fIquota\fP user...
- .br
- \fBnnacct\fP \-\fBZERO\fP
- .SH DESCRIPTION
- --- 5,11 ----
- .SH SYNOPSIS
- \fBnnacct\fP \-\fBr\fP [ \-\fBf\fP file ] [ \-\fBa\fP ] [ user ]...
- .br
- ! \fBnnacct\fP [ \-\fBp\fP\fIpolicy\fP ] [ \-\fBq\fP\fIquota\fP ] user...
- .br
- \fBnnacct\fP \-\fBZERO\fP
- .SH DESCRIPTION
- ***************
- *** 84,89 ****
- --- 84,95 ----
- access policies can also be defined in this file. This allows you to
- change the policies or prices without having to recompile the whole
- package since only \fInnacct\fP is modified.
- + .SH PRIVILEGED USERS
- + Normally, only root is allowed to change user policy or quota, list
- + all user's accounting data etc. This privilege can be shared with
- + other users by listing their login name in the file $CLIENT/admins.
- + There should be exactly one login name per line, and no blanks are
- + allowed.
- .SH FILES
- .DT
- .ta \w'$db/acctlog'u+3m
- ***************
- *** 91,96 ****
- --- 97,104 ----
- $db/acct accounting data (accumulated per user)
- .br
- $db/acctlog accounting log (grows indefinitely)
- + .br
- + $lib/admins login names of privileged \fInnacct\fP users.
- .DT
- .SH SEE ALSO
- nn(1), nnusage(1)
- *** ./LAST/master.c Mon Jul 9 17:59:59 1990
- --- master.c Wed Jul 18 11:49:12 1990
- ***************
- *** 586,595 ****
- if (kill_running) {
- if (proto_lock(I_AM_MASTER, PL_TERMINATE) < 0)
- temp = 0;
- ! else
- ! for (temp = 10; --temp >= 0; sleep(3))
- ! if (proto_lock(I_AM_MASTER, PL_CHECK) < 0) break;
-
- if (temp < 0) {
- printf("The running master will not die....!\n");
- log_entry('E', "Could not kill running master");
- --- 586,603 ----
- if (kill_running) {
- if (proto_lock(I_AM_MASTER, PL_TERMINATE) < 0)
- temp = 0;
- ! else {
- ! int mpid;
-
- + for (temp = 10; --temp >= 0; sleep(3)) {
- + sleep(3);
- + mpid = proto_lock(I_AM_MASTER, PL_CHECK);
- + if (mpid < 0) break;
- + sleep(1);
- + kill(mpid, SIGTERM); /* SIGHUP lost??? */
- + }
- + }
- +
- if (temp < 0) {
- printf("The running master will not die....!\n");
- log_entry('E', "Could not kill running master");
- ***************
- *** 600,605 ****
- --- 608,618 ----
- !reread_groups_file && lock_message == NULL &&
- group_selection == 0 && initialize < 0)
- exit(0);
- + }
- +
- + if (!file_exist(db_directory, "drwx")) {
- + fprintf(stderr, "%s invoked with wrong user privileges\n", argv[0]);
- + exit(9);
- }
-
- if (proto_lock(I_AM_MASTER, PL_SET) != 0) {
- *** ./LAST/menu.c Mon Jul 16 17:38:50 1990
- --- menu.c Tue Jul 17 23:06:53 1990
- ***************
- *** 326,331 ****
- --- 326,332 ----
- }
-
- export long n_selected;
- + export int show_art_next_invalid;
-
- static count_selected_articles()
- {
- ***************
- *** 357,362 ****
- --- 358,364 ----
- for (next = cur+1; next < n_articles; next++) {
- if (articles[next]->attr & A_SELECT) break;
- }
- + show_art_next_invalid = 0;
-
- show:
- ah = articles[cur];
- ***************
- *** 390,401 ****
- break;
-
- case MC_DO_SELECT:
- - for (temp = cur+1; temp < n_articles; temp++) {
- - if (auto_select_article(ah = articles[temp], 2)) {
- - ah->attr = A_SELECT;
- - if (temp < next) next = temp;
- - }
- - }
- break;
-
- case MC_PREV:
- --- 392,397 ----
- ***************
- *** 465,470 ****
- --- 461,470 ----
- return MC_NEXTGROUP;
- }
-
- + if (show_art_next_invalid)
- + for (next = cur+1; next < n_articles; next++) {
- + if (articles[next]->attr & A_SELECT) break;
- + }
- prev = cur; cur = next;
- }
-
- *** ./LAST/more.c Mon Jul 16 17:38:50 1990
- --- more.c Wed Jul 18 15:50:37 1990
- ***************
- *** 5,10 ****
- --- 5,11 ----
- */
-
- #include "config.h"
- + #include "articles.h"
- #include "news.h"
- #include "term.h"
- #include "menu.h"
- ***************
- *** 26,31 ****
- --- 27,33 ----
- export char *trusted_escapes = NULL;
- export int new_read_prompt = 1;
- export int re_layout_more = -1;
- + export int scroll_last_lines = 0;
-
- import int preview_window;
- import int novice;
- ***************
- *** 93,98 ****
- --- 95,101 ----
- 'x', "Back-Ref", &news.ng_bref, 0,
- 'v', "Save-File", NULL, 0,
- 'a', "Spool-File", NULL, 0,
- + 'i', "DB-Info", NULL, 0,
- 0
- };
-
- ***************
- *** 147,152 ****
- --- 150,162 ----
- if (lp == NULL) return 0;
- if (expand_file_name(special, lp, 2)) lp = special;
- break;
- +
- + case 'i':
- + sprintf(special, "#%ld fl=%lx re=%d li=%d hp=%ld fp=%ld lp=%ld",
- + (long)ah->a_number, (long)ah->flag, ah->replies, ah->lines,
- + (long)ah->hpos, (long)ah->fpos, (long)ah->lpos);
- + lp = special;
- + break;
- }
- if (lp == NULL) return 0;
-
- ***************
- *** 207,212 ****
- --- 217,244 ----
- return 0;
- }
-
- + static do_auto_select()
- + {
- + register article_header *ah;
- + register int32 n;
- + import int show_art_next_invalid;
- + int count = 0;
- +
- + for (n = 0; n < n_articles; n++) {
- + ah = articles[n];
- + if (ah->attr == A_READ) continue;
- + if (ah->attr & A_SELECT) continue;
- +
- + if (auto_select_article(ah, 2)) {
- + ah->attr = A_AUTO_SELECT;
- + show_art_next_invalid = 1;
- + count++;
- + }
- + }
- +
- + if (count) msg("Selected %d articles", count);
- + }
- +
- static char *a_st_flags(flag)
- flag_type flag;
- {
- ***************
- *** 269,274 ****
- --- 301,308 ----
- struct news_header news_save;
- struct digest_header digest_save;
- int linenum, maxline, topline, print_lines, lno1;
- + int scroll_lines, scroll_from;
- + off_t scroll_offset;
- int underline_line, fake_underline;
- int match_lines, match_redraw, match_topline, match_botline;
- int goto_line, prev_goto, stop_line, extra_lines;
- ***************
- *** 372,377 ****
- --- 406,422 ----
- fake_underline = 0;
- shade_overlap = 0;
-
- + scroll_lines = scroll_from = 0;
- + scroll_offset = 0;
- + if (scroll_last_lines < 0)
- + scroll_from = -1;
- + else if (scroll_last_lines > 0) {
- + if (ah->lines > 0)
- + scroll_from = ah->lines - scroll_last_lines;
- + else
- + scroll_offset = ah->lpos - (scroll_last_lines * 64);
- + }
- +
- stop_line = first_page_lines ? first_page_lines : -1;
-
- if (new_read_prompt) {
- ***************
- *** 877,882 ****
- --- 922,938 ----
-
- if (eof && lno == screen_offset) more_return(MC_NEXT);
-
- + if (scroll_lines > 0) {
- + if (eof)
- + scroll_lines = 0;
- + else {
- + print_lines = 1;
- + scroll_lines--;
- + prompt_line = lno;
- + goto scroll_next;
- + }
- + }
- +
- raw();
-
- prompt_line = lno;
- ***************
- *** 950,955 ****
- --- 1006,1017 ----
- case K_CONTINUE:
- if (eof) break;
- if (screen_offset == 0 && form_feed == 0 && stop_line) {
- + if ((scroll_from && linenum > scroll_from) ||
- + (scroll_offset && ftell(art) > scroll_offset)) {
- + scroll_lines = Lines - 2 - overlap;
- + print_lines = 1;
- + goto scroll;
- + }
- if (linenum > overlap) {
- underline_line = linenum;
- linenum -= overlap;
- ***************
- *** 1077,1083 ****
- case K_KILL_HANDLING:
- switch (kill_menu(ah)) {
- case 0:
- ! more_return(MC_DO_SELECT);
- case 1:
- more_return(MC_DO_KILL);
- default:
- --- 1139,1147 ----
- case K_KILL_HANDLING:
- switch (kill_menu(ah)) {
- case 0:
- ! do_auto_select();
- ! ah->attr = 0;
- ! break;
- case 1:
- more_return(MC_DO_KILL);
- default:
- ***************
- *** 1147,1152 ****
- --- 1211,1218 ----
- goto next_page;
-
- stop_line = -1;
- +
- + scroll_next:
- gotoxy(0, Lines-1);
- c = print_lines + lno - Lines + 2;
- while (--c >= 0) {
- *** ./LAST/news.c Mon Jul 16 17:38:51 1990
- --- news.c Tue Jul 17 20:26:15 1990
- ***************
- *** 7,13 ****
- #include "config.h"
- #include "news.h"
-
- ! export retry_on_error = 0;
-
- char *parse_header(f, hdr_field, modes, hdrbuf)
- FILE *f;
- --- 7,13 ----
- #include "config.h"
- #include "news.h"
-
- ! export int retry_on_error = 0;
-
- char *parse_header(f, hdr_field, modes, hdrbuf)
- FILE *f;
- *** ./LAST/newsrc.c Mon Jul 16 17:38:51 1990
- --- newsrc.c Tue Jul 17 19:17:50 1990
- ***************
- *** 491,541 ****
- * prepare to use newsrc & select information for a specific group
- */
-
- ! static char *rc_p; /* pointer into newsrc_line */
- ! static article_number rc_min; /* current newsrc range min */
- ! static article_number rc_max; /* current newsrc range max */
- ! static char rc_delim; /* delimiter character */
- !
- ! static char *sel_p; /* pointer into select_line */
- ! static char *sel_initp; /* rc_p after initialization */
- ! static article_number sel_min; /* current select range min */
- ! static article_number sel_max; /* current select range max */
- ! static article_number sel_digest; /* current digest */
- ! static attr_type sel_type; /* current select range type */
- ! static char sel_delim; /* delimiter character */
-
-
- ! use_newsrc(gh, use_orig)
- ! register group_header *gh;
- ! int use_orig;
- {
- ! /* TR( ("===%s===", gh->group_name) );*/
- !
- ! if (use_orig) {
- ! rc_p = gh->newsrc_orig;
- ! sel_p = gh->select_orig;
- } else {
- ! rc_p = gh->newsrc_line;
- ! sel_p = gh->select_line;
- }
-
- ! if (rc_p == NULL) {
- ! rc_min = rc_max = END_OF_LIST;
- } else {
- ! rc_min = rc_max = -1;
- ! rc_delim = SP;
- ! rc_p += gh->group_name_length + 1;
- }
-
- ! sel_digest = 0;
- ! if (sel_p == NULL) {
- ! sel_min = sel_max = END_OF_LIST;
- ! } else {
- ! sel_p += gh->group_name_length + 1;
- ! sel_min = sel_max = -1;
- ! sel_delim = SP;
- }
- }
- /*
- #define TRC(wh) TR( ("r%d>%-8.8s< %ld %ld %ld %c\n", wh, p ? p : "***", n, rc_min, rc_max, rc_delim) )
- #define TSEL(wh) TR( ("s%d>%-8.8s< %ld %ld %ld %c\n", wh, p ? p : "***", n, sel_min, sel_max, sel_delim) )
- --- 491,560 ----
- * prepare to use newsrc & select information for a specific group
- */
-
- ! static struct rc_info {
- ! char *rc_p; /* pointer into newsrc_line */
- ! article_number rc_min; /* current newsrc range min */
- ! article_number rc_max; /* current newsrc range max */
- ! char rc_delim; /* delimiter character */
- !
- ! char *sel_p; /* pointer into select_line */
- ! char *sel_initp; /* rc_p after initialization */
- ! article_number sel_min; /* current select range min */
- ! article_number sel_max; /* current select range max */
- ! article_number sel_digest; /* current digest */
- ! attr_type sel_type; /* current select range type */
- ! char sel_delim; /* delimiter character */
- ! } orig, cur;
-
- + static int rctest_mode;
-
- ! static init_rctest(gh, r)
- ! group_header *gh;
- ! register struct rc_info *r;
- {
- ! if (r->rc_p == NULL) {
- ! r->rc_min = r->rc_max = END_OF_LIST;
- } else {
- ! r->rc_min = r->rc_max = -1;
- ! r->rc_delim = SP;
- ! r->rc_p += gh->group_name_length + 1;
- }
-
- ! r->sel_digest = 0;
- ! if (r->sel_p == NULL) {
- ! r->sel_min = r->sel_max = END_OF_LIST;
- } else {
- ! r->sel_p += gh->group_name_length + 1;
- ! r->sel_min = r->sel_max = -1;
- ! r->sel_delim = SP;
- }
- + }
- +
- + use_newsrc(gh, mode)
- + register group_header *gh;
- + int mode;
- + {
- + orig.rc_p = gh->newsrc_orig;
- + orig.sel_p = gh->select_orig;
- + cur.rc_p = gh->newsrc_line;
- + cur.sel_p = gh->select_line;
-
- ! rctest_mode = mode;
- !
- ! switch (mode) {
- ! case 0:
- ! init_rctest(gh, &cur);
- ! break;
- ! case 1:
- ! init_rctest(gh, &orig);
- ! break;
- ! case 2:
- ! init_rctest(gh, &cur);
- ! init_rctest(gh, &orig);
- ! break;
- }
- }
- +
- /*
- #define TRC(wh) TR( ("r%d>%-8.8s< %ld %ld %ld %c\n", wh, p ? p : "***", n, rc_min, rc_max, rc_delim) )
- #define TSEL(wh) TR( ("s%d>%-8.8s< %ld %ld %ld %c\n", wh, p ? p : "***", n, sel_min, sel_max, sel_delim) )
- ***************
- *** 543,570 ****
- #define TRC(wh)
- #define TSEL(wh)
-
- ! attr_type test_article(ah)
- register article_header *ah;
- {
- register char *p;
- register int c;
- register int32 n = ah->a_number, x;
-
- ! while (n > rc_max) {
- /* get next interval from newsrc line */
- ! rc_min = -1;
- x = 0;
- ! p = rc_p;
- TRC(1);
-
- if (*p == RC_DELIM) p++;
- if (*p == NUL || *p == NL)
- ! rc_min = rc_max = END_OF_LIST;
- else {
- for ( ; (c = *p) && c != RC_DELIM && c != NL; p++) {
- if (c == RC_RANGE) {
- ! if (rc_min < 0)
- ! rc_min = x;
- else
- msg("syntax error in rc file");
- x = 0;
- --- 562,590 ----
- #define TRC(wh)
- #define TSEL(wh)
-
- ! static attr_type rctest(ah, r)
- register article_header *ah;
- + register struct rc_info *r;
- {
- register char *p;
- register int c;
- register int32 n = ah->a_number, x;
-
- ! while (n > r->rc_max) {
- /* get next interval from newsrc line */
- ! r->rc_min = -1;
- x = 0;
- ! p = r->rc_p;
- TRC(1);
-
- if (*p == RC_DELIM) p++;
- if (*p == NUL || *p == NL)
- ! r->rc_min = r->rc_max = END_OF_LIST;
- else {
- for ( ; (c = *p) && c != RC_DELIM && c != NL; p++) {
- if (c == RC_RANGE) {
- ! if (r->rc_min < 0)
- ! r->rc_min = x;
- else
- msg("syntax error in rc file");
- x = 0;
- ***************
- *** 574,604 ****
- if (isascii(*p) && isdigit(*p))
- x = x*10 + c - '0';
- }
- ! rc_max = x;
- ! if (rc_min < 0) rc_min = x;
- ! rc_p = p;
- }
- }
- TRC(2);
-
- ! if (n >= rc_min && n <= rc_max) return A_READ;
-
- ! p = sel_p;
- ! if (sel_digest != 0) {
- ! if (n == sel_digest && (ah->flag & A_DIGEST)) {
- ! if (*sel_p == SEL_END_DIGEST) return A_READ;
- n = ah->fpos;
- } else {
- ! if (n < sel_digest) return 0;
- while (*p && *p++ != SEL_END_DIGEST);
- ! sel_digest = 0;
- ! sel_min = sel_max = -1;
- }
- }
-
- ! while (n > sel_max) {
- ! sel_min = -1;
- ! sel_type = A_SELECT;
- x = 0;
- TSEL(3);
-
- --- 594,624 ----
- if (isascii(*p) && isdigit(*p))
- x = x*10 + c - '0';
- }
- ! r->rc_max = x;
- ! if (r->rc_min < 0) r->rc_min = x;
- ! r->rc_p = p;
- }
- }
- TRC(2);
-
- ! if (n >= r->rc_min && n <= r->rc_max) return A_READ;
-
- ! p = r->sel_p;
- ! if (r->sel_digest != 0) {
- ! if (n == r->sel_digest && (ah->flag & A_DIGEST)) {
- ! if (*(r->sel_p) == SEL_END_DIGEST) return A_READ;
- n = ah->fpos;
- } else {
- ! if (n < r->sel_digest) return 0;
- while (*p && *p++ != SEL_END_DIGEST);
- ! r->sel_digest = 0;
- ! r->sel_min = r->sel_max = -1;
- }
- }
-
- ! while (n > r->sel_max) {
- ! r->sel_min = -1;
- ! r->sel_type = A_SELECT;
- x = 0;
- TSEL(3);
-
- ***************
- *** 605,623 ****
- for (;;) {
- switch (*p) {
- case SEL_SELECT:
- ! sel_type = A_SELECT;
- p++;
- continue;
- case SEL_LEAVE:
- ! sel_type = A_LEAVE;
- p++;
- continue;
- case SEL_SEEN:
- ! sel_type = A_SEEN;
- p++;
- continue;
- case SEL_UNREAD:
- ! sel_type = 0;
- p++;
- continue;
- case SEL_DIGEST:
- --- 625,643 ----
- for (;;) {
- switch (*p) {
- case SEL_SELECT:
- ! r->sel_type = A_SELECT;
- p++;
- continue;
- case SEL_LEAVE:
- ! r->sel_type = A_LEAVE;
- p++;
- continue;
- case SEL_SEEN:
- ! r->sel_type = A_SEEN;
- p++;
- continue;
- case SEL_UNREAD:
- ! r->sel_type = 0;
- p++;
- continue;
- case SEL_DIGEST:
- ***************
- *** 624,638 ****
- while (*p && *p++ != SEL_END_DIGEST);
- continue;
- case SEL_END_DIGEST:
- ! if (sel_digest) {
- ! if (sel_digest == ah->a_number) {
- ! sel_p = p;
- return A_READ;
- }
- ! sel_digest = 0;
- }
- p++;
- ! sel_type = A_SELECT;
- continue;
- default:
- break;
- --- 644,658 ----
- while (*p && *p++ != SEL_END_DIGEST);
- continue;
- case SEL_END_DIGEST:
- ! if (r->sel_digest) {
- ! if (r->sel_digest == ah->a_number) {
- ! r->sel_p = p;
- return A_READ;
- }
- ! r->sel_digest = 0;
- }
- p++;
- ! r->sel_type = A_SELECT;
- continue;
- default:
- break;
- ***************
- *** 641,647 ****
- }
-
- if (*p == NUL || *p == NL) {
- ! sel_min = sel_max = END_OF_LIST;
- break;
- }
-
- --- 661,667 ----
- }
-
- if (*p == NUL || *p == NL) {
- ! r->sel_min = r->sel_max = END_OF_LIST;
- break;
- }
-
- ***************
- *** 667,674 ****
- break;
-
- case SEL_RANGE:
- ! if (sel_min < 0)
- ! sel_min = x;
- else
- msg("syntax error in sel file");
- x = 0;
- --- 687,694 ----
- break;
-
- case SEL_RANGE:
- ! if (r->sel_min < 0)
- ! r->sel_min = x;
- else
- msg("syntax error in sel file");
- x = 0;
- ***************
- *** 682,690 ****
- break;
- }
- p++;
- ! sel_digest = x;
- ! if (n < sel_digest) {
- ! sel_p = p;
- return 0;
- }
- n = ah->fpos;
- --- 702,710 ----
- break;
- }
- p++;
- ! r->sel_digest = x;
- ! if (n < r->sel_digest) {
- ! r->sel_p = p;
- return 0;
- }
- n = ah->fpos;
- ***************
- *** 692,725 ****
- break;
-
- case NL:
- ! if (sel_digest == 0) break;
- /* fall thru */
- case SEL_END_DIGEST:
- ! if (sel_digest == ah->a_number) {
- ! sel_p = p;
- ! return (ah->fpos == x) ? sel_type : A_READ;
- }
- ! sel_digest = 0;
- x = -1;
- break;
- }
- break;
- }
- ! sel_max = x;
- ! if (sel_min < 0) sel_min = x;
- ! sel_p = p;
- }
-
- ! if (n >= sel_min && n <= sel_max) return sel_type;
-
- ! if (sel_digest) return A_READ; /* only read articles are not listed */
-
- return 0; /* unread, unseen, unselected */
- }
-
- /*
- * We only mark the articles that should remain unread
- */
-
- /*VARARGS*/
- static append(va_alist)
- --- 712,773 ----
- break;
-
- case NL:
- ! if (r->sel_digest == 0) break;
- /* fall thru */
- case SEL_END_DIGEST:
- ! if (r->sel_digest == ah->a_number) {
- ! r->sel_p = p;
- ! return (ah->fpos == x) ? r->sel_type : A_READ;
- }
- ! r->sel_digest = 0;
- x = -1;
- break;
- }
- break;
- }
- ! r->sel_max = x;
- ! if (r->sel_min < 0) r->sel_min = x;
- ! r->sel_p = p;
- }
-
- ! if (n >= r->sel_min && n <= r->sel_max) return r->sel_type;
-
- ! if (r->sel_digest) return A_READ; /* only read articles are not listed */
-
- return 0; /* unread, unseen, unselected */
- }
-
- + attr_type test_article(ah)
- + article_header *ah;
- + {
- + attr_type a;
- +
- + switch (rctest_mode) {
- + case 0:
- + return rctest(ah, &cur);
- + case 1:
- + return rctest(ah, &orig);
- + case 2:
- + a = rctest(ah, &cur);
- + if (a != A_READ) return a;
- + if (rctest(ah, &orig) == A_READ) return A_KILL;
- + return a;
- + }
- + }
- +
- /*
- * We only mark the articles that should remain unread
- */
- + static char *rc_p; /* pointer into newsrc_line */
- + static article_number rc_min; /* current newsrc range min */
- + static char rc_delim; /* delimiter character */
- +
- + static char *sel_p; /* pointer into select_line */
- + static char *sel_initp; /* rc_p after initialization */
- + static article_number sel_min; /* current select range min */
- + static article_number sel_max; /* current select range max */
- + static article_number sel_digest; /* current digest */
- + static char sel_delim; /* delimiter character */
-
- /*VARARGS*/
- static append(va_alist)
- ***************
- *** 821,826 ****
- --- 869,876 ----
- out:
- if ((gh->last_article = get_last_article(gh)) < 0)
- gh->last_article = 0;
- + if (gh->last_article < gh->first_article)
- + gh->first_article = gh->last_article;
-
- gh->group_flag |= G_READ; /* should not call update_group again */
- if (mark_counter > 0) {
- ***************
- *** 1072,1084 ****
- count = gh->unread_count;
-
- for (n = gh->last_article + 1; n <= last; n++) {
- ! if (rc_min == END_OF_LIST) {
- /* current & rest is unread */
- last = n - 1;
- break;
- }
- ahdr.a_number = n;
- ! if ((attr = test_article(&ahdr)) == A_READ) continue;
- if (at >= atmax) {
- atmax += 100;
- numtab = resizeobj(numtab, article_number, atmax);
- --- 1122,1134 ----
- count = gh->unread_count;
-
- for (n = gh->last_article + 1; n <= last; n++) {
- ! if (cur.rc_min == END_OF_LIST) {
- /* current & rest is unread */
- last = n - 1;
- break;
- }
- ahdr.a_number = n;
- ! if ((attr = rctest(&ahdr, &cur)) == A_READ) continue;
- if (at >= atmax) {
- atmax += 100;
- numtab = resizeobj(numtab, article_number, atmax);
- ***************
- *** 1213,1223 ****
- for (ahdr.a_number = gh->last_article + 1;
- ahdr.a_number <= gh->last_db_article;
- ahdr.a_number++) {
- ! if (rc_min == END_OF_LIST) {
- gh->unread_count += gh->last_db_article - ahdr.a_number + 1;
- break;
- }
- ! if (test_article(&ahdr) != A_READ)
- gh->unread_count++;
- }
- }
- --- 1263,1273 ----
- for (ahdr.a_number = gh->last_article + 1;
- ahdr.a_number <= gh->last_db_article;
- ahdr.a_number++) {
- ! if (cur.rc_min == END_OF_LIST) {
- gh->unread_count += gh->last_db_article - ahdr.a_number + 1;
- break;
- }
- ! if (rctest(&ahdr, &cur) != A_READ)
- gh->unread_count++;
- }
- }
- *** ./LAST/nn.c Mon Jul 16 17:38:52 1990
- --- nn.c Tue Jul 17 18:25:26 1990
- ***************
- *** 37,42 ****
- --- 37,43 ----
- do_kill_handling = 1,
- group_name_args = 0,
- merged_menu = 0,
- + prev_also_read = 1,
- repeat_group_query = 0,
- report_cost_on_exit = 1,
- show_motd_on_entry = 1,
- ***************
- *** 251,256 ****
- --- 252,259 ----
- prev = tmp;
- if (gh->unread_count <= 0)
- group_mode |= ACC_ORIG_NEWSRC;
- + else if (prev_also_read)
- + group_mode |= ACC_MERGED_NEWSRC;
- goto enter_direct;
-
- case ME_NEXT:
- *** ./LAST/nntp.c Mon Jul 9 18:00:04 1990
- --- nntp.c Tue Jul 17 20:49:19 1990
- ***************
- *** 51,57 ****
- export int nntp_failed = 0; /* bool: t iff connection is broken in
- nntp_get_article() or nntp_get_active() */
-
- ! export nntp_cache_size = NNTPCACHE;
- export char *nntp_cache_dir = NULL;
-
- export int nntp_local_server = 0;
- --- 51,57 ----
- export int nntp_failed = 0; /* bool: t iff connection is broken in
- nntp_get_article() or nntp_get_active() */
-
- ! export int nntp_cache_size = NNTPCACHE;
- export char *nntp_cache_dir = NULL;
-
- export int nntp_local_server = 0;
- *** ./LAST/patchlevel.h Mon Jul 16 17:38:53 1990
- --- patchlevel.h Wed Jul 18 16:05:11 1990
- ***************
- *** 19,25 ****
- * 1990-06-25: Patch #6 (6.4.6) - MEDIUM
- * 1990-07-09: Patch #7 (6.4.7) - LOW
- * 1990-07-16: Patch #8 (6.4.8) - HIGH
- */
-
- ! #define PATCHLEVEL 8
-
- --- 19,26 ----
- * 1990-06-25: Patch #6 (6.4.6) - MEDIUM
- * 1990-07-09: Patch #7 (6.4.7) - LOW
- * 1990-07-16: Patch #8 (6.4.8) - HIGH
- + * 1990-07-19: Patch #9 (6.4.9) - MEDIUM
- */
-
- ! #define PATCHLEVEL 9
-
- *** ./LAST/sequence.c Tue May 22 12:53:57 1990
- --- sequence.c Wed Jul 18 19:54:09 1990
- ***************
- *** 430,435 ****
- --- 430,437 ----
- register group_header *gh;
- group_header *get_group_search();
- register char *group;
- + register char *value;
- + int non_vars;
- int found, any, errors, gnum;
-
- group_sequence = NULL;
- ***************
- *** 436,442 ****
- --- 438,446 ----
- also_subgroups = 0;
-
- any = errors = 0;
- + non_vars = 0;
- while (group = *groups++) {
- + non_vars++;
-
- if (hex_group_args) {
- sscanf(group, "%x", &gnum);
- ***************
- *** 451,456 ****
- --- 455,467 ----
- continue;
- }
-
- + if (value = strchr(group, '=')) {
- + *value++ = NUL;
- + set_variable(group, 1, value);
- + non_vars--;
- + continue;
- + }
- +
- if (*group == '+' || *group == '~' || file_exist(group, "fr")) {
- faked_entry(group, G_FOLDER);
- any++;
- ***************
- *** 490,495 ****
- --- 501,509 ----
- } else
- any++;
- }
- +
- + if (non_vars == 0)
- + return normal_group_sequence();
-
- end_sequence();
-
- *** ./LAST/term.c Mon Jul 16 17:38:54 1990
- --- term.c Tue Jul 17 21:21:16 1990
- ***************
- *** 317,322 ****
- --- 317,324 ----
-
- if (batch_mode) {
- term_name = "batch";
- + close(0);
- + open("/dev/null", 0);
- return;
- }
-
- ***************
- *** 1078,1090 ****
-
- if (completion != NULL_FCT) {
- if (comp_used && c == erase_key) {
- - CALL(completion)(buf, -1);
- - if (did_help) { clrmsg(i); did_help = 0; }
- if (comp_len) {
- i -= comp_len;
- while (--comp_len >= 0) putchar(BS);
- clrline();
- }
- comp_len = comp_used = 0;
- if (lastc == help_key) goto no_completion;
- continue;
- --- 1080,1093 ----
-
- if (completion != NULL_FCT) {
- if (comp_used && c == erase_key) {
- if (comp_len) {
- i -= comp_len;
- while (--comp_len >= 0) putchar(BS);
- clrline();
- }
- + if (!CALL(completion)(buf, -(i+1)) && did_help)
- + clrmsg(i);
- + did_help = 0;
- comp_len = comp_used = 0;
- if (lastc == help_key) goto no_completion;
- continue;
- ***************
- *** 1145,1152 ****
- }
-
- if (comp_used) {
- ! CALL(completion)(buf, -1);
- ! if (did_help) clrmsg(i);
- comp_len = comp_used = 0;
- }
- }
- --- 1148,1156 ----
- }
-
- if (comp_used) {
- ! if (!CALL(completion)(buf, -(i+1)) && did_help)
- ! clrmsg(i);
- ! did_help = 0;
- comp_len = comp_used = 0;
- }
- }
- *** ./LAST/variable.c Mon Jul 16 17:38:55 1990
- --- variable.c Wed Jul 18 19:54:09 1990
- ***************
- *** 94,99 ****
- --- 94,100 ----
- monitor_mode,
- new_read_prompt,
- novice,
- + prev_also_read,
- preview_mark_read,
- query_signature,
- quick_save,
- ***************
- *** 155,160 ****
- --- 156,162 ----
- response_check_pause,
- retry_on_error,
- save_counter_offset,
- + scroll_last_lines,
- show_purpose_mode,
- slow_speed,
- sort_mode,
- ***************
- *** 320,325 ****
- --- 322,328 ----
- "patch-command", STR SAFE 1, (char **)patch_command,
- "preview-continuation", INT 0, (char **)&preview_continuation,
- "preview-mark-read", BOOL 0, (char **)&preview_mark_read,
- + "previous-also-read", BOOL 0, (char **)&prev_also_read,
- "print-header-lines", STR 0, (char **)&print_header_lines,
- "print-header-type", INT 0, (char **)&print_header_type,
- "printer", STR SAFE 1, (char **)printer,
- ***************
- *** 342,347 ****
- --- 345,351 ----
- "save-header-lines", STR 0, (char **)&save_header_lines,
- "save-report", BOOL 0, (char **)&save_report,
- "scroll-clear-page", BOOL 0, (char **)&scroll_clear_page,
- + "scroll-last-lines", INT 0, (char **)&scroll_last_lines,
- "select-leave-next", BOOL 0, (char **)&select_leave_next,
- "select-on-sender", BOOL 0, (char **)&select_on_sender,
- "shading-off", CODES 0, (char **)&shade_off_attr,
- ***************
- *** 604,609 ****
- --- 608,614 ----
- article_limit = (on && value > 0) ? value : -1;
- break;
- }
- + break;
-
- case V_CODES:
- {
- ***************
- *** 665,670 ****
- --- 670,676 ----
- register char *str;
- register int b;
-
- + if (tag != NULL)
- *tag = var_on_stack(var) ? '>' :
- (var->var_flags & V_MODIFIED) ? '*' : ' ';
-
- ***************
- *** 752,757 ****
- --- 758,770 ----
- return res;
- }
-
- + static int vc_column;
- +
- + var_compl_opts(col)
- + int col;
- + {
- + vc_column = col;
- + }
-
- var_completion(path, index)
- char *path;
- ***************
- *** 760,767 ****
- static char *head, *tail = NULL;
- static int len;
- static struct variable_defs *var, *help_var;
-
- ! if (index < 0) return 0;
-
- if (path) {
- head = path;
- --- 773,784 ----
- static char *head, *tail = NULL;
- static int len;
- static struct variable_defs *var, *help_var;
- + extern int prompt_length, prompt_line;
-
- ! if (index < 0) {
- ! clrmsg(-(index + 1));
- ! return 1;
- ! }
-
- if (path) {
- head = path;
- ***************
- *** 807,815 ****
- --- 824,835 ----
- if (index < 0) continue;
- if (index > 0) break;
- sprintf(tail, "%s ", var->var_name + len);
- + msg("%.70s", var_value(var, (char *)NULL));
- + gotoxy(prompt_length + vc_column, prompt_line);
- var++;
- return 1;
- }
- + clrmsg(vc_column);
- return 0;
- }
-
- ***************
- *** 977,984 ****
- return 0;
- }
-
- ! disp_variables(all)
- int all;
- {
- char *str, pushed;
- int b;
- --- 997,1005 ----
- return 0;
- }
-
- ! disp_variables(all, rexp)
- int all;
- + char *rexp;
- {
- char *str, pushed;
- int b;
- ***************
- *** 988,1002 ****
-
- if (in_init) return;
-
- - pg_init(0, 1);
- -
- clrdisp();
- ! if (novice && !all) {
- msg("Use `:set all' to see all variable settings");
- home();
- }
- ! pg_next();
- ! so_printf("Variable settings:");
-
- for (var = variables; var < &variables[TABLE_SIZE]; var++) {
- if (pg_regexp != NULL && regexec(pg_regexp, var->var_name) == 0)
- --- 1009,1026 ----
-
- if (in_init) return;
-
- clrdisp();
- ! if (novice && !all && rexp == NULL) {
- msg("Use `:set all' to see all variable settings");
- home();
- }
- !
- ! so_printxy(0, 0, "Variable settings");
- ! pg_init(1, 1);
- ! if (rexp) {
- ! pg_regexp = regcomp(rexp + 1);
- ! all = 1;
- ! }
-
- for (var = variables; var < &variables[TABLE_SIZE]; var++) {
- if (pg_regexp != NULL && regexec(pg_regexp, var->var_name) == 0)
-